<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  <title>widget和Notification上的RemoteView | 清风向阳</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  
    <meta name="keywords" content="Joker,Joker's Blog" />
  
  <meta name="description" content="我们在开发过程中有关于View的基本都是在当前的进程，那么会不会存在一个需要我们编写一个远程使用View的需求呢，答案是肯定的。我们在开发桌面小工具或者自定义消息通知栏的布局的时候，我们就有可能需要编写远程的View-RemoteView.">
<meta name="keywords" content="widget,Notification,RemoteView">
<meta property="og:type" content="article">
<meta property="og:title" content="widget和Notification上的RemoteView">
<meta property="og:url" content="http://mjjde.github.io/2016/03/16/widget和Notification上的RemoteView/index.html">
<meta property="og:site_name" content="清风向阳">
<meta property="og:description" content="我们在开发过程中有关于View的基本都是在当前的进程，那么会不会存在一个需要我们编写一个远程使用View的需求呢，答案是肯定的。我们在开发桌面小工具或者自定义消息通知栏的布局的时候，我们就有可能需要编写远程的View-RemoteView.">
<meta property="og:updated_time" content="2017-09-15T07:00:42.000Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="widget和Notification上的RemoteView">
<meta name="twitter:description" content="我们在开发过程中有关于View的基本都是在当前的进程，那么会不会存在一个需要我们编写一个远程使用View的需求呢，答案是肯定的。我们在开发桌面小工具或者自定义消息通知栏的布局的时候，我们就有可能需要编写远程的View-RemoteView.">
  
  
    <link rel="icon" href="/favicon_pic.ico">
  
  <link href="//cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
  <link rel="stylesheet" href="/css/style.css">
  <script src="/js/pace.min.js"></script>
  

  
  

</head>

<body>
  <div id="container">
      <header id="header">
    <div id="banner"></div>
    <div id="header-outer">
        <div id="header-menu" class="header-menu-pos animated">
            <div class="header-menu-container">
                <a href="/" class="left">
                    <span class="site-title">Joker&#39;s Blog</span>
                </a>
                <nav id="header-menu-nav" class="right">
                    
                    <a  href="/">
                        <i class="fa fa-home"></i>
                        <span>Home</span>
                    </a>
                    
                    <a  href="/archives">
                        <i class="fa fa-archive"></i>
                        <span>Archives</span>
                    </a>
                    
                    <a  href="/about">
                        <i class="fa fa-user"></i>
                        <span>About</span>
                    </a>
                    
                </nav>
                <a class="mobile-header-menu-button">
                    <i class="fa fa-bars"></i>
                </a>
            </div>
        </div>
        <div id="header-row">
            <div id="logo">
                <a href="/">
                    <img src="/images/avatar.jpg" alt="logo">
                </a>
            </div>
            <div class="header-info">
                <div id="header-title">
                    
                    <h2>
                        Joker&#39;s Blog
                    </h2>
                    
                </div>
                <div id="header-description">
                    
                    <h3>
                        一个认真的技术博客
                    </h3>
                    
                </div>
            </div>
            <nav class="header-nav">
                <div class="social">
                    
                        <a title="Joker"  href="//joker-studio.pub">
                            <i class="fa fa-home fa-2x"></i></a>
                    
                        <a title="Github" target="_blank" href="//github.com/mjjde">
                            <i class="fa fa-github fa-2x"></i></a>
                    
                </div>
            </nav>
        </div>
    </div>
</header>
      <div class="outer">
        <section id="main" class="body-wrap"><article id="post-widget和Notification上的RemoteView" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-inner">
    
      <header class="article-header">
        
  
    <h1 class="post-title" itemprop="name">
      widget和Notification上的RemoteView
    </h1>
    <div class="post-title-bar">
      <ul>
          
              <li>
                  <i class="fa fa-book"></i>
                  
                      <a href="/categories/Android技术/">Android技术</a>
                  
              </li>
          
        <li>
          <i class="fa fa-calendar"></i>  2016-03-16
        </li>
        <li>
          <i class="fa fa-eye"></i>
          <span id="busuanzi_value_page_pv"></span>
        </li>
      </ul>
    </div>
  

          
      </header>
    
    <div class="article-entry post-content" itemprop="articleBody">
      
            
            <blockquote>
<p>我们在开发过程中有关于View的基本都是在当前的进程，那么会不会存在一个需要我们编写一个远程使用View的需求呢，答案是肯定的。我们在开发桌面小工具或者自定义消息通知栏的布局的时候，我们就有可能需要编写远程的View-RemoteView.<br><a id="more"></a></p>
<h4 id="Notification"><a href="#Notification" class="headerlink" title="Notification"></a><a href="#Notification" title="Notification"></a>Notification</h4></blockquote>
<p>我们在使用消息通知栏时，经常有需要要求我们去自定义UI，毕竟系统自带的布局不怎么好看，或者于我们的应用Style不统一。那么我就需要自己去定义布局了。</p>
<p>Notification布局的自定义中，就会使用要我们的RemoteView</p>
<p>一般使用系统自带的UI代码如下：</p>
<figure class="highlight nix"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div></pre></td><td class="code"><pre><div class="line">Notification <span class="attr">n</span> = new Notification();</div><div class="line">n.<span class="attr">icon</span> = R.drawable.ic_launcher;</div><div class="line">n.<span class="attr">tickText</span> = <span class="string">"Hello"</span>;</div><div class="line">n.<span class="attr">when</span> = System.currentTimeMillis();</div><div class="line">n.<span class="attr">flags</span> = Notification.FLAG_AUTO_CANCEL;</div><div class="line">Intent <span class="attr">intent</span> = new Intent(this,MainAct.class);</div><div class="line">PendingIntent <span class="attr">pendingIntent</span> = PendingIntent</div><div class="line">.getActivity(this,<span class="number">0</span>,intent,PendingIntent.FLAG_UPDATE_CURRENT);</div><div class="line">n.setLatestEventInfo(this,<span class="string">"test"</span>,<span class="string">"this is</span></div><div class="line">notification",pendingInetnt);</div><div class="line">NotificationManager <span class="attr">manager</span> =(NotificatiobManager)</div><div class="line">getService(Context.NOTIFICATION_SERVICE);</div><div class="line">manager.notify(<span class="number">0</span>,n);</div></pre></td></tr></table></figure>
<p>如果我们需要自定义通知栏的UI,我们可以通过RemoteView来实现：</p>
<figure class="highlight mipsasm"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div></pre></td><td class="code"><pre><div class="line">Notification n = new Notification()<span class="comment">;</span></div><div class="line">n.icon = R.drawable.ic_launcher<span class="comment">;</span></div><div class="line">n.tickText = <span class="string">"Hello"</span><span class="comment">;</span></div><div class="line">n.when = System.currentTimeMillis()<span class="comment">;</span></div><div class="line">n.flags = Notification.FLAG_AUTO_CANCEL<span class="comment">;</span></div><div class="line">Intent intent = new Intent(this,MainAct.class)<span class="comment">;</span></div><div class="line">PendingIntent pendingIntent = PendingIntent</div><div class="line">.getActivity(this,<span class="number">0</span>,intent,PendingIntent.FLAG_UPDATE_CURRENT)<span class="comment">;</span></div><div class="line">RemoteViews remoteViews = new </div><div class="line">RemoteViews(getPackageName(),R.layout.layout_notification)<span class="comment">;</span></div><div class="line">remoteViews.setTextViewText(R.id.name,<span class="string">"hello"</span>)<span class="comment">;</span></div><div class="line">remoteViews.setImageViewResource(R.id.icon,R.id.tuan)<span class="comment">;</span></div><div class="line">PendingIntent pendingIntent2 = PendingIntent</div><div class="line">.getActivity(this,<span class="number">0</span>,new Intent(this,test2.class),PendingIntent.FLAG_UPDATE_CURRENT)<span class="comment">;</span></div><div class="line">remoteViews.setOnclickPendingIntent(R.id.icon,pendingIntent2)<span class="comment">;</span></div><div class="line">n.contentView = remoteViews<span class="comment">;</span></div><div class="line">n.contentIntent = pendingIntent<span class="comment">;</span></div><div class="line">NotificationManager manager =(NotificatiobManager)</div><div class="line">getService(<span class="built_in">Context</span>.NOTIFICATION_SERVICE)<span class="comment">;</span></div><div class="line">manager.notify(<span class="number">0</span>,n)<span class="comment">;</span></div></pre></td></tr></table></figure>
<p>我们在上面看到如果要给RemoteView布局设置属性的时候，不是通过findById去找到对应的View去设置的，而是通过RemoteViews自带的API去设置，这是因为这个RemoteView最终是要显示在另一个进程中的，所以我们是没办法通过findById去找到对应的Vioew的，通过自身的API去设置View的属性也不是立即就会应用的，而是等待notify的时候，再去设置。</p>
<h4 id="AppWidgetProvider"><a href="#AppWidgetProvider" class="headerlink" title="AppWidgetProvider"></a><a href="#AppWidgetProvider" title="AppWidgetProvider"></a>AppWidgetProvider</h4><p>桌面小部件是Android为应该提供快捷或小工具的应用，要实现这样的一个小部件，我们当然也是需要使用RemoteView，它会显示在系统的进程中，于Notification类似，都会显示在system进程中去。</p>
<p>创建一个小部件需要以下步骤：</p>
<ul>
<li>定义小部件的布局。我们可以在res下面的layout目录下创建xml文件，来布局我们的小部件样式。</li>
<li>定义小部件的配置信息。在res下的xml目录下创建一个xml文件。用来描述小部件的信息。</li>
</ul>
<figure class="highlight xml"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div></pre></td><td class="code"><pre><div class="line"><span class="php"><span class="meta">&lt;?</span>xml version=<span class="string">"1.0"</span> encoding=<span class="string">"utf-8"</span><span class="meta">?&gt;</span></span></div><div class="line"><span class="tag">&lt;<span class="name">appwidget-provider</span> </span></div><div class="line">    <span class="attr">xmlns:android</span>=<span class="string">"http://schemas.android.com/apk/res/android"</span></div><div class="line">    <span class="attr">android:initialLayout</span>=<span class="string">"@layout/widget"</span></div><div class="line">    <span class="attr">android:minHeight</span>=<span class="string">"30dp"</span></div><div class="line">    <span class="attr">android:minWidth</span>=<span class="string">"30dp"</span></div><div class="line">    <span class="attr">android:updatePeriodMillis</span>=<span class="string">"1000"</span></div><div class="line">&gt;</div><div class="line"><span class="tag">&lt;/<span class="name">appwidget-provider</span>&gt;</span></div></pre></td></tr></table></figure>
<p>android:initialLayout表示小部件显示的layout，android:updatePeriodMillis表示小部件自动更新的时间周期。</p>
<ul>
<li><p>定义小部件的实现类，继承AppWidgetProvider.</p>
<figure class="highlight scala"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div></pre></td><td class="code"><pre><div class="line">public <span class="class"><span class="keyword">class</span> <span class="title">MyAppWidget</span> <span class="keyword">extends</span> <span class="title">AppWidgetProvider</span></span>&#123;</div><div class="line"></div><div class="line"><span class="meta">@Override</span></div><div class="line">public void onReceive(<span class="keyword">final</span> <span class="type">Context</span> context,<span class="type">Intent</span> intent)</div><div class="line">    <span class="comment">//桌面小布局本身就是个广播接收器。</span></div><div class="line">&#125;</div><div class="line"></div><div class="line"><span class="meta">@Override</span></div><div class="line">public void onUpdate(<span class="type">Context</span> conetx,<span class="type">AppWidgetManager</span> appWidgetManager ,int [] appWidgetIds)&#123;</div><div class="line">    <span class="comment">//桌面小部件每次更新都会调用该方法。</span></div><div class="line">&#125;</div></pre></td></tr></table></figure>
</li>
<li><p>在manifest中声明小部件。</p>
</li>
</ul>
<figure class="highlight xml"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div></pre></td><td class="code"><pre><div class="line"><span class="tag">&lt;<span class="name">receiver</span> <span class="attr">android:name</span>=<span class="string">".MyAppWidgetProviders"</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">meta-data</span></span></div><div class="line">        <span class="attr">android:name</span>=<span class="string">"android.appwidget.provider"</span></div><div class="line">        <span class="attr">android:resource</span>=<span class="string">"@xml/appwidget_provider_info"</span>&gt;<span class="tag">&lt;/<span class="name">meta-data</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">intent-filter</span>&gt;</span></div><div class="line">        <span class="tag">&lt;<span class="name">action</span> <span class="attr">android:name</span>=<span class="string">"com.open_source.joker.myapplication.click"</span>&gt;</span><span class="tag">&lt;/<span class="name">action</span>&gt;</span></div><div class="line">        <span class="tag">&lt;<span class="name">action</span> <span class="attr">android:name</span>=<span class="string">"android.appwidget.action.APPWIDGET_UPDATE"</span>&gt;</span><span class="tag">&lt;/<span class="name">action</span>&gt;</span></div><div class="line">    <span class="tag">&lt;/<span class="name">intent-filter</span>&gt;</span></div><div class="line"><span class="tag">&lt;/<span class="name">receiver</span>&gt;</span></div></pre></td></tr></table></figure>
<h4 id="PendingIntent"><a href="#PendingIntent" class="headerlink" title="PendingIntent"></a><a href="#PendingIntent" title="PendingIntent"></a>PendingIntent</h4><p>在上面多次提到了PendingIntent,它于Intent是有区别的，PendingIntent主要是用于待定的意图，该意图将会在未来的某个时刻发生，而Intent一旦被Start后就会立刻生效，这就是主要的区别。</p>
<p>PendingIntent可以实现三中意图的发生，分别是Activity，Service，广播，分别对应的三个API是</p>
<p>PendingIntent.getActivity(Context context, int requestCode, Intent, int flags);</p>
<p>对应startActivity();</p>
<p>PengdingIntent.getService(Context context, int requestCode, Intent, int flags)</p>
<p>对应startService();</p>
<p>PengdingIntent.getBroadcast(Context context, int requestCode, Intent, int flags)</p>
<p>对应sendBroadcast();</p>
<p>对于第一和第三个参数还是很明白的，主要是第二和第四个参数需要说明。</p>
<p>requestCode表是返回码，于Flag一起标示一个PendingIntent。</p>
<p>一般requestCode设置为0，使用Flag去区别PendingIntent。</p>
<p>Flag有四个常见类型。</p>
<ul>
<li><p>FLAG_ONE_SHOT: 使用该Flag标记PendingIntent时，标示该意图只会发生一次，之后将不会再次触发意图，在Notification上的表现为，当有多个消息通知栏出现，点击其中的一个触发了意图，之后的消息通知点击后无效。</p>
</li>
<li><p>FLAG_NO_CREATE: 使用该Flag设置的PendingIntent时，不会主动创建，在Notification上的表现为。如果没有触发过这个意图的PendingIntent存在，那么点击后无反应，在使用中很少会用到</p>
</li>
<li><p>FLAG_CANCEL_CURRENT: 使用这个表示的PendingIntent时，对于已经存在的PendingIntent来说，如果有产生一个PendingIntent的话，之前的都会被取消掉，新创建一个PendingIntent。在Notification上的表现为，之前展示消息通知无法点开，最后一个可以点开。</p>
</li>
<li><p>FLAG_UPDATE_CURRENT: 使用这个表示的PendingIntent时，对于之前的PendingIntent都会被更新成最新的Intent，Extras也会被替换。在Notification上的表现为，之前展示的通知与最后一个一样。</p>
</li>
</ul>
<p>上面讨论的是基于同一个PendingIntent，那么匹配原则是：requestCode相同，Intent相同。<br>requestCode相同很容易理解，Intent相同的原则是：ComponentName和intent-filtre相同，Intent的Extra是不参与匹配的。</p>

            <div class="post-copyright">
    <div class="content">
        <p>最后更新： 2017年09月15日 15:00</p>
        <p>原始链接： <a class="post-url" href="/2016/03/16/widget和Notification上的RemoteView/" title="widget和Notification上的RemoteView">http://mjjde.github.io/2016/03/16/widget和Notification上的RemoteView/</a></p>
        <footer>
            <a href="http://mjjde.github.io">
                <img src="/images/avatar.jpg" alt="Joker Mei">
                Joker Mei
            </a>
        </footer>
    </div>
</div>

      
    </div>
    <footer class="article-footer">
        
        
<div class="post-share">
    <a href="javascript:;" id="share-sub" class="post-share-fab">
        <i class="fa fa-share-alt"></i>
    </a>
    <div class="post-share-list" id="share-list">
        <ul class="share-icons">
          <li>
            <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=http://mjjde.github.io/2016/03/16/widget和Notification上的RemoteView/&title=《widget和Notification上的RemoteView》 — 清风向阳&pic=http://mjjde.github.ioimages/avatar.jpg" data-title="微博">
              <i class="fa fa-weibo"></i>
            </a>
          </li>
          <li>
            <a class="weixin share-sns" id="wxFab" href="javascript:;" data-title="微信">
              <i class="fa fa-weixin"></i>
            </a>
          </li>
          <li>
            <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=http://mjjde.github.io/2016/03/16/widget和Notification上的RemoteView/&title=《widget和Notification上的RemoteView》 — 清风向阳&source=
我们在开发过程中有关于View的基本都是在当前的进程，那么会不会存在一个需要我们编写一个远程使用View的需求呢，答案是肯定的。我们在开发桌面小工具或者..." data-title="QQ">
              <i class="fa fa-qq"></i>
            </a>
          </li>
          <li>
            <a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=http://mjjde.github.io/2016/03/16/widget和Notification上的RemoteView/" data-title="Facebook">
              <i class="fa fa-facebook"></i>
            </a>
          </li>
          <li>
            <a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=《widget和Notification上的RemoteView》 — 清风向阳&url=http://mjjde.github.io/2016/03/16/widget和Notification上的RemoteView/&via=http://mjjde.github.io" data-title="Twitter">
              <i class="fa fa-twitter"></i>
            </a>
          </li>
          <li>
            <a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=http://mjjde.github.io/2016/03/16/widget和Notification上的RemoteView/" data-title="Google+">
              <i class="fa fa-google-plus"></i>
            </a>
          </li>
        </ul>
     </div>
</div>
<div class="post-modal wx-share" id="wxShare">
    <a class="close" href="javascript:;" id="wxShare-close">×</a>
    <p>扫一扫，分享到微信</p>
    <img src="//api.qrserver.com/v1/create-qr-code/?data=http://mjjde.github.io/2016/03/16/widget和Notification上的RemoteView/" alt="微信分享二维码">
</div>

<div class="mask"></div>

        
        <ul class="article-footer-menu">
            
            
  <li class="article-footer-tags">
    <i class="fa fa-tags"></i>
      
    <a href="/tags/widget/" class="color2">widget</a>
      
    <a href="/tags/Notification/" class="color3">Notification</a>
      
    <a href="/tags/RemoteView/" class="color1">RemoteView</a>
      
  </li>

        </ul>
        
    </footer>
  </div>
</article>


    <aside class="post-toc-pos post-toc-top" id="post-toc">
        <nav class="post-toc-wrap">
            <ol class="post-toc"><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#Notification"><span class="post-toc-text">Notification</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#AppWidgetProvider"><span class="post-toc-text">AppWidgetProvider</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#PendingIntent"><span class="post-toc-text">PendingIntent</span></a></li></ol>
        </nav>
    </aside>
    

<nav id="article-nav">
  
    <a href="/2016/06/15/DiskLruCache-Java实现基于LRU的磁盘缓存/" id="article-nav-newer" class="article-nav-link-wrap">

      <span class="article-nav-title">
        <i class="fa fa-hand-o-left" aria-hidden="true"></i>
        
          DiskLruCache Java实现基于LRU的磁盘缓存
        
      </span>
    </a>
  
  
    <a href="/2016/01/15/android事件分发机制/" id="article-nav-older" class="article-nav-link-wrap">
      <span class="article-nav-title">android事件分发机制</span>
      <i class="fa fa-hand-o-right" aria-hidden="true"></i>
    </a>
  
</nav>



    
</section>
        
      </div>
      <footer id="footer">
  <div class="outer">
    <div id="footer-info" class="inner">
      
<p>
    <span id="busuanzi_container_site_uv" style='display:none'>
        总访客数：<span id="busuanzi_value_site_uv"></span>
    </span>
    <span id="busuanzi_container_site_pv" style='display:none'>
        总访问量：<span id="busuanzi_value_site_pv"></span>
    </span>
</p>


      <p>
        Powered by  <a href="http://hexo.io/" target="_blank">Hexo</a>
        Theme <a href="//github.com/wongminho/hexo-theme-miho" target="_blank">MiHo</a>
      &copy; 2018 Joker Mei<br>
      </p>
    </div>
  </div>
</footer>
    <script async src="//dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>
<script src="//cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
<script>
  var mihoConfig = {
      root: "http://mjjde.github.io",
      animate: false,
      isHome: false,
      share: true
  }
</script>
<div class="sidebar">
    <!-- <div id="sidebar-search" title="Search">
        <i class="fa fa-search"></i>
    </div> -->
    <div id="sidebar-category" title="Categories">
        <i class="fa fa-book"></i>
    </div>
    <div id="sidebar-tag" title="Tags">
        <i class="fa fa-tags"></i>
    </div>
    <div id="sidebar-top">
        <span class="sidebar-top-icon"><i class="fa fa-angle-up"></i></span>
    </div>
</div>
<div class="sidebar-menu-box" id="sidebar-menu-box">
    <div class="sidebar-menu-box-container">
        <div id="sidebar-menu-box-categories">
            <a class="category-link" href="/categories/Android技术/">Android技术</a><a class="category-link" href="/categories/其他技术/">其他技术</a><a class="category-link" href="/categories/网络技术/">网络技术</a><a class="category-link" href="/categories/设计模式/">设计模式</a>
        </div>
        <div id="sidebar-menu-box-tags">
            <a href="/tags/Activity/" style="font-size: 10px;">Activity</a> <a href="/tags/Android/" style="font-size: 16px;">Android</a> <a href="/tags/Android-IPC/" style="font-size: 10px;">Android-IPC</a> <a href="/tags/Binder/" style="font-size: 16px;">Binder</a> <a href="/tags/DiskLruCache/" style="font-size: 10px;">DiskLruCache</a> <a href="/tags/Fragment/" style="font-size: 10px;">Fragment</a> <a href="/tags/HTTP/" style="font-size: 20px;">HTTP</a> <a href="/tags/Java/" style="font-size: 10px;">Java</a> <a href="/tags/Notification/" style="font-size: 10px;">Notification</a> <a href="/tags/RemoteView/" style="font-size: 10px;">RemoteView</a> <a href="/tags/Rxjava/" style="font-size: 14px;">Rxjava</a> <a href="/tags/ServiceManager/" style="font-size: 14px;">ServiceManager</a> <a href="/tags/android/" style="font-size: 12px;">android</a> <a href="/tags/gradle/" style="font-size: 10px;">gradle</a> <a href="/tags/java/" style="font-size: 18px;">java</a> <a href="/tags/other/" style="font-size: 10px;">other</a> <a href="/tags/volley/" style="font-size: 12px;">volley</a> <a href="/tags/widget/" style="font-size: 10px;">widget</a> <a href="/tags/事件/" style="font-size: 10px;">事件</a> <a href="/tags/组件化/" style="font-size: 10px;">组件化</a> <a href="/tags/设计模式/" style="font-size: 18px;">设计模式</a>
        </div>
    </div>
    <a href="javascript:;" class="sidebar-menu-box-close">&times;</a>
</div>
<div class="mobile-header-menu-nav" id="mobile-header-menu-nav">
    <div id="mobile-header-menu-container">
        <span class="title">Menu</span>
        <ul class="mobile-header-menu-navbar">
            
            <li>
                <a  href="/">
                    <i class="fa fa-home"></i><span>Home</span>
                </a>
            </li>
            
            <li>
                <a  href="/archives">
                    <i class="fa fa-archive"></i><span>Archives</span>
                </a>
            </li>
            
            <li>
                <a  href="/about">
                    <i class="fa fa-user"></i><span>About</span>
                </a>
            </li>
            
        </ul>
    </div>
</div>
<div class="search-wrap">
    <span class="search-close">&times;</span>
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="back">
            <i class="icon icon-lg icon-chevron-left"></i>
        </a>
        <input class="search-field" placeholder="Search..." id="keywords">
        <a id="search-submit" href="javascript:;">
            <i class="fa fa-search"></i>
        </a>
    <div class="search-container" id="search-container">
        <ul class="search-result" id="search-result">
        </ul>
    </div>
</div>

<div id="search-tpl">
    <li class="search-result-item">
        <a href="{url}" class="search-item-li">
            <span class="search-item-li-title" title="{title}">{title}</span>
        </a>
    </li>
</div>
<script src="/js/search.js"></script>
<script src="/js/main.js"></script>








  </div>
</body>
</html>